import java.util.Arrays;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2022-09-11
 * Time: 上午 2:20
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str1 = scanner.nextLine();
        String str2 = scanner.nextLine();
        String str3 = null;
        String str4 = str1;
        for (int i = 0; i < str2.length(); i++) {
            char ch = str2.charAt(i);
            char[] s = str1.toCharArray();
            for (int j = 0; j < str1.length(); j++) {
                if(ch == s[j]) {
                    str3 = str4.replace(ch +"", "");
                }
                if(str3 != null) {
                    str4 = str3;
                }
            }
        }
        System.out.println(str3);
    }
    public static void main1(String[] args) {

            Scanner scan = new Scanner(System.in);
            int n = scan.nextInt();
            int[] array = new int[n * 3];

            while(scan.hasNext()) {
                for (int j = 0; j < array.length; j++) {
                    array[j] = scan.nextInt();
                }
           }
        Arrays.sort(array);
        long num =0;
        for (int j = n; j < array.length; j+=2) {
            num += array[j];
        }

        System.out.println(num);
     }
}
